package com.kiln.juxingqs.ui

import com.kiln.juxingqs.R
import com.kiln.juxingqs.api.bean.ArticleInfo
import com.kiln.juxingqs.databinding.ActivityPtzxdetailBinding
import com.kiln.juxingqs.ui.vm.TestViewModel
import com.kiln.juxingqs.BaseMiddleActivity

class PtzxDetailActivity : BaseMiddleActivity<TestViewModel, ActivityPtzxdetailBinding>() {

    override fun getLayout(): Int {
        return R.layout.activity_ptzxdetail
    }


    override fun initView() {
        binding?.apply {
            event = this@PtzxDetailActivity
        }
    }

    override fun initData() {
        val bean = intent.getParcelableExtra<ArticleInfo.Article>("bean")
        bean?.let {
            binding.bean = it
            mImgLoader.load(it.article_img).into(binding.img)
        }
    }

    override fun initViewModel(): TestViewModel = createViewModel()

}